import {axios, baseURL} from "./base/axios.config";
// 文章管理的接口封装
export default {
    //文章管理
    getArticle(id) {
        return axios.post('/api/articles/getArticleEditDto', {id: id});
    },
    getAll(params) {
        return axios.post('/api/articles/getAll', params);
    },
    save(params) {
        return axios.post('/api/articles/save', params);
    },
    deletes(idArray) {
        return axios.post('/api/articles/deletes', idArray);
    },

    //分类管理
    saveCategory(params) {
        return axios.post('/api/category/save', params);
    },
    getAllCategory(params) {
        return axios.post('/api/category/getAll', params);
    },
    getCategoryTreeList(params) {
        return axios.post('/api/category/getTreeList', params);
    },
    deleteCategory(id) {
        return axios.post('/api/category/deletes', {id: id});
    },

    //标签管理
    saveTag(params) {
        return axios.post('/api/tags/save', params);
    },
    getAllTag(params) {
        return axios.post('/api/tags/getAll', params);
    },
    getSimpleTags(params) {
        return axios.post('/api/tags/getSimpleTags', params);
    },
    deleteTags(ids) {
        return axios.post('/api/tags/deletes', ids);
    },
}
